home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.4 KB | 114 lines | [TEXT/CWIE] |
- //========================================================================================
- //
- // File: View.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef VIEW_H
- #define VIEW_H
-
- #ifndef FWSVIEW_H
- #include "FWSView.h"
- #endif
-
- #ifndef CONSTANT_H
- #include "Constant.h"
- #endif
-
- //========================================================================================
- // Forward Declaration
- //========================================================================================
-
- class FW_CViewContext;
- class CTablePart;
- class CTableFrame;
- class CTableSelection;
- class CTablePartContent;
- class CCell;
-
- //========================================================================================
- // class CTableView
- //========================================================================================
-
- class CTableView : public FW_CSuperView
- {
- public:
- FW_DECLARE_CLASS
-
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- CTableView(Environment* ev);
- virtual ~CTableView();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- // ----- Rendering -----
- virtual void Draw(Environment* ev,
- ODFacet* odFacet,
- ODShape* invalidShape);
-
- // ----- Menus -----
- virtual FW_Handled DoAdjustMenus(Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
- virtual FW_Handled DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
-
- // ----- Events -----
- virtual FW_Handled DoMouseDown(Environment* ev, const FW_CMouseEvent& theMouseEvent);
- virtual void DoActivateEvent(Environment* ev, const FW_CActivateEvent& theActivateEvent);
-
- // ----- Adjust Cursor -----
- virtual FW_Handled AdjustCursor(Environment* ev, ODFacet* odFacet, const FW_CPoint& where, ODEventInfo* eventInfo);
-
- // ----- Archiving -----
- static void* Create(FW_CReadableStream& stream, FW_ClassTypeConstant type);
- static void Destroy(void* object, FW_ClassTypeConstant type);
-
- virtual void PostCreateViewFromStream(Environment* ev);
-
- // ----- Internal Transformed changed -----
- virtual void InternalTransformChanged(Environment *ev);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void DrawGray(Environment* ev, FW_CGraphicContext& gc);
-
- // ----- Grid -----
- void DrawGrid(Environment* ev, FW_CGraphicContext& gc, FW_Boolean gray);
- void HideShowGrid(Environment* ev);
- FW_Boolean IsGridShown(Environment*) const
- {return fGridShown;}
-
- // ----- Mouse down response -----
- FW_Boolean Resize(Environment* ev,
- const FW_CMouseEvent& theMouseEvent,
- const CCell& cell,
- ETableLoc tl);
-
- // ----- Cell Highlight -----
- void DrawCellHighlight(Environment* ev,
- FW_CViewContext& fc,
- const CCell& cell);
- void ChangeHighlightState(Environment* ev,
- ODHighlight highlight);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CTablePart* fTablePart;
- CTablePartContent* fTableContent;
- CTableFrame* fTableFrame;
- ODHighlight fHighlight;
- FW_Boolean fGridShown;
- };
-
- #endif
-